using Microsoft.Extensions.DependencyInjection;
using YiSha.Service.OrganizationManage;
using YiSha.Service.SystemManage;

namespace YiSha.Service;

public static class ServiceCollectionExtension
{
    public static IServiceCollection AddService(this IServiceCollection services)
    {
        // 注册服务层
        services.AddScoped<UserService>();
        services.AddScoped<DepartmentService>();
        services.AddScoped<PositionService>();
        services.AddScoped<NewsService>();
        services.AddScoped<UserBelongService>();
        services.AddScoped<AreaService>();
        services.AddScoped<RoleService>();
        services.AddScoped<AutoJobService>();
        services.AddScoped<AutoJobLogService>();
        services.AddScoped<DatabaseTableMySqlService>();
        services.AddScoped<DatabaseTableOracleService>();
        services.AddScoped<IDatabaseTableService,DatabaseTableSqlServerService>();
        services.AddScoped<DataDictService>();
        services.AddScoped<DataDictDetailService>();
        services.AddScoped<LogApiService>();
        services.AddScoped<LogLoginService>();
        services.AddScoped<LogOperateService>();
        services.AddScoped<MenuService>();
        services.AddScoped<MenuAuthorizeService>();

        return services;
    }
} 